Skip to content

chore: Upgrade to eslint9#733

Closed
bingenito wants to merge 7 commits into
morganstanley:mainfrom
bingenito:eslint9
Closed

chore: Upgrade to eslint9#733
bingenito wants to merge 7 commits into
morganstanley:mainfrom
bingenito:eslint9

Conversation

@bingenito
Copy link
Copy Markdown
Member

  • Introduced ESLint9 configuration file with rules and license header enforcement.
  • Added license header to missing files via lint:fix
  • Configured ESLint to ignore specific directories and files, including build artifacts and configuration files.

Copilot AI review requested due to automatic review settings May 2, 2025 13:25
@bingenito bingenito requested a review from a team as a code owner May 2, 2025 13:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the ESLint configuration to ESLint9, enforces license headers across the codebase, and configures ESLint to ignore build artifacts and non-essential files. Key changes include the introduction of a new ESLint configuration file (eslint.config.mjs), the addition of license headers to several source and test files, and minor refactoring for improved clarity.

Reviewed Changes

Copilot reviewed 10 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/desktopjs/vite.config.ts Added license header to the Vite configuration file
packages/desktopjs/tests/setup.ts Added license header to the test setup file
packages/desktopjs-openfin/vite.config.ts Added license header to the OpenFin Vite configuration file
packages/desktopjs-openfin/tests/openfin.spec.ts Minor type refinements in event listener parameter definitions
packages/desktopjs-openfin/src/openfin.ts Refactored getState to use an explicit if/else block
packages/desktopjs-electron/vite.config.ts Added license header to the Electron Vite configuration file
packages/desktopjs-electron/tests/setup.ts Added license header to the Electron test setup file
eslint.config.mjs New ESLint configuration with license header enforcement
README.md Updated documentation with linting instructions
Files not reviewed (3)
  • .eslintrc.json: Language not supported
  • package.json: Language not supported
  • tsconfig.test.json: Language not supported
Comments suppressed due to low confidence (1)

eslint.config.mjs:17

  • Confirm that the LICENSE_HEADER array accurately reflects the required Apache License 2.0 header; consider referencing an external license file if the header text might evolve over time.
const LICENSE_HEADER = [

return new Promise<any>(resolve => {
(this.nativeWindow && (<any>this.nativeWindow).getState) ? resolve((<any>this.nativeWindow).getState()) : resolve(undefined);
// Use explicit if/else instead of ternary for side-effect
if (this.nativeWindow && (<any>this.nativeWindow).getState) {
Copy link

Copilot AI May 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The explicit if/else block improves clarity compared to the condensed ternary operator; ensure this change aligns with the project's coding style and consider adding an inline comment to explain its purpose if necessary.

Copilot uses AI. Check for mistakes.
@bingenito bingenito closed this May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants